// src/mocks/handlers.js
import { http, HttpResponse } from "msw";

export const handlers = [
  // Intercept "GET https://example.com/user" requests...
  http.post("/api/login", () => {
    // ...and respond to them using this JSON response.
    return HttpResponse.json({
      success: true,
      message: "Logged in successfully",
      token: "1234567890",
    });
  }),
  http.post("/api/register", () => {
    // ...and respond to them using this JSON response.
    return HttpResponse.json({
      success: true,
      message: "Registered successfully",
    });
  }),
  http.post("/api/logout", () => {
    // ...and respond to them using this JSON response.
    return HttpResponse.json({
      success: true,
      message: "Logged out successfully",
    });
  }),
];
